package com.example.tilitili.config;

import com.example.tilitili.pojo.User;

/**
 * @author chenyu
 * @create 2022-03-02 16:04
 */
public class UserContext {
    private static ThreadLocal<User> userHolder = new ThreadLocal<>();
    public static void setUser(User user) {
        userHolder.set(user);
    }
    public static User getUser() {
        return userHolder.get();
    }
}